# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Container.V1.Model.NetworkConfig do
  @moduledoc """
  NetworkConfig reports the relative names of network & subnetwork.

  ## Attributes

  *   `datapathProvider` (*type:* `String.t`, *default:* `nil`) - The desired datapath provider for this cluster. By default, uses the IPTables-based kube-proxy implementation.
  *   `defaultEnablePrivateNodes` (*type:* `boolean()`, *default:* `nil`) - Controls whether by default nodes have private IP addresses only. It is invalid to specify both PrivateClusterConfig.enablePrivateNodes and this field at the same time. To update the default setting, use ClusterUpdate.desired_default_enable_private_nodes
  *   `defaultSnatStatus` (*type:* `GoogleApi.Container.V1.Model.DefaultSnatStatus.t`, *default:* `nil`) - Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when default_snat_status is disabled. When disabled is set to false, default IP masquerade rules will be applied to the nodes to prevent sNAT on cluster internal traffic.
  *   `disableL4LbFirewallReconciliation` (*type:* `boolean()`, *default:* `nil`) - Disable L4 load balancer VPC firewalls to enable firewall policies.
  *   `dnsConfig` (*type:* `GoogleApi.Container.V1.Model.DNSConfig.t`, *default:* `nil`) - DNSConfig contains clusterDNS config for this cluster.
  *   `enableCiliumClusterwideNetworkPolicy` (*type:* `boolean()`, *default:* `nil`) - Whether CiliumClusterwideNetworkPolicy is enabled on this cluster.
  *   `enableFqdnNetworkPolicy` (*type:* `boolean()`, *default:* `nil`) - Whether FQDN Network Policy is enabled on this cluster.
  *   `enableIntraNodeVisibility` (*type:* `boolean()`, *default:* `nil`) - Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network.
  *   `enableL4ilbSubsetting` (*type:* `boolean()`, *default:* `nil`) - Whether L4ILB Subsetting is enabled for this cluster.
  *   `enableMultiNetworking` (*type:* `boolean()`, *default:* `nil`) - Whether multi-networking is enabled for this cluster.
  *   `gatewayApiConfig` (*type:* `GoogleApi.Container.V1.Model.GatewayAPIConfig.t`, *default:* `nil`) - GatewayAPIConfig contains the desired config of Gateway API on this cluster.
  *   `inTransitEncryptionConfig` (*type:* `String.t`, *default:* `nil`) - Specify the details of in-transit encryption. Now named inter-node transparent encryption.
  *   `network` (*type:* `String.t`, *default:* `nil`) - Output only. The relative name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. Example: projects/my-project/global/networks/my-network
  *   `networkPerformanceConfig` (*type:* `GoogleApi.Container.V1.Model.ClusterNetworkPerformanceConfig.t`, *default:* `nil`) - Network bandwidth tier configuration.
  *   `privateIpv6GoogleAccess` (*type:* `String.t`, *default:* `nil`) - The desired state of IPv6 connectivity to Google Services. By default, no private IPv6 access to or from Google Services (all access will be via IPv4)
  *   `serviceExternalIpsConfig` (*type:* `GoogleApi.Container.V1.Model.ServiceExternalIPsConfig.t`, *default:* `nil`) - ServiceExternalIPsConfig specifies if services with externalIPs field are blocked or not.
  *   `subnetwork` (*type:* `String.t`, *default:* `nil`) - Output only. The relative name of the Google Compute Engine [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the cluster is connected. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :datapathProvider => String.t() | nil,
          :defaultEnablePrivateNodes => boolean() | nil,
          :defaultSnatStatus => GoogleApi.Container.V1.Model.DefaultSnatStatus.t() | nil,
          :disableL4LbFirewallReconciliation => boolean() | nil,
          :dnsConfig => GoogleApi.Container.V1.Model.DNSConfig.t() | nil,
          :enableCiliumClusterwideNetworkPolicy => boolean() | nil,
          :enableFqdnNetworkPolicy => boolean() | nil,
          :enableIntraNodeVisibility => boolean() | nil,
          :enableL4ilbSubsetting => boolean() | nil,
          :enableMultiNetworking => boolean() | nil,
          :gatewayApiConfig => GoogleApi.Container.V1.Model.GatewayAPIConfig.t() | nil,
          :inTransitEncryptionConfig => String.t() | nil,
          :network => String.t() | nil,
          :networkPerformanceConfig =>
            GoogleApi.Container.V1.Model.ClusterNetworkPerformanceConfig.t() | nil,
          :privateIpv6GoogleAccess => String.t() | nil,
          :serviceExternalIpsConfig =>
            GoogleApi.Container.V1.Model.ServiceExternalIPsConfig.t() | nil,
          :subnetwork => String.t() | nil
        }

  field(:datapathProvider)
  field(:defaultEnablePrivateNodes)
  field(:defaultSnatStatus, as: GoogleApi.Container.V1.Model.DefaultSnatStatus)
  field(:disableL4LbFirewallReconciliation)
  field(:dnsConfig, as: GoogleApi.Container.V1.Model.DNSConfig)
  field(:enableCiliumClusterwideNetworkPolicy)
  field(:enableFqdnNetworkPolicy)
  field(:enableIntraNodeVisibility)
  field(:enableL4ilbSubsetting)
  field(:enableMultiNetworking)
  field(:gatewayApiConfig, as: GoogleApi.Container.V1.Model.GatewayAPIConfig)
  field(:inTransitEncryptionConfig)
  field(:network)

  field(:networkPerformanceConfig,
    as: GoogleApi.Container.V1.Model.ClusterNetworkPerformanceConfig
  )

  field(:privateIpv6GoogleAccess)
  field(:serviceExternalIpsConfig, as: GoogleApi.Container.V1.Model.ServiceExternalIPsConfig)
  field(:subnetwork)
end

defimpl Poison.Decoder, for: GoogleApi.Container.V1.Model.NetworkConfig do
  def decode(value, options) do
    GoogleApi.Container.V1.Model.NetworkConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Container.V1.Model.NetworkConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
